package com.ljf.authority.web;

import com.ljf.authority.enums.AuthorityBaseApiTabulationBelongServiceEnum;
import com.ljf.authority.enums.AuthorityBaseApiTabulationMethodEnum;
import com.ljf.authority.enums.AuthorityBaseApiTabulationPermissionTypeEnum;
import com.ljf.authority.enums.AuthorityBaseApiTabulationSynchronizationTypeEnum;
import com.ljf.common.enums.ActivationEnum;
import com.ljf.common.result.ResultModel;
import com.ljf.common.utils.EnumUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 权限模块 枚举类 控制器
 *
 * @author LJF
 * @since 2025-05-10
 */
@RestController
@RequestMapping("/enum/authority")
@Api(value = "权限模块枚举类接口", tags = "权限模块枚举类接口")
public class AuthorityEnumController {

    @GetMapping("/menu_tabulation/activation")
    @ApiOperation(value = "查询菜单列表激活状态枚举")
    public ResultModel getMenuTabulationActivation() {
        return EnumUtil.getEnumVoResult(ActivationEnum.values());
    }

    @GetMapping("/api_tabulation/belong_service")
    @ApiOperation(value = "查询API列表定义归属服务枚举")
    public ResultModel getApiTabulationBelongService() {
        return EnumUtil.getEnumVoResult(AuthorityBaseApiTabulationBelongServiceEnum.values());
    }

    @GetMapping("/api_tabulation/activation")
    @ApiOperation(value = "查询API列表定义激活状态枚举接口")
    public ResultModel getApiTabulationActivation() {
        return EnumUtil.getEnumVoResult(ActivationEnum.values());
    }

    @GetMapping("/api_tabulation/method")
    @ApiOperation(value = "查询API列表定义请求方法枚举接口")
    public ResultModel getApiTabulationMethod() {
        return EnumUtil.getEnumVoResult(AuthorityBaseApiTabulationMethodEnum.values());
    }

    @GetMapping("/api_tabulation/permission_type")
    @ApiOperation(value = "查询API列表定义权限类型枚举接口")
    public ResultModel getApiTabulationPermissionType() {
        return EnumUtil.getEnumVoResult(AuthorityBaseApiTabulationPermissionTypeEnum.values());
    }

    @GetMapping("/api_tabulation/synchronization_type")
    @ApiOperation(value = "查询API列表定义同步类型枚举接口")
    public ResultModel getApiTabulationSynchronizationType() {
        return EnumUtil.getEnumVoResult(AuthorityBaseApiTabulationSynchronizationTypeEnum.values());
    }

}